Skip to content

Conversation

steffenlarsen
Copy link
Contributor

This commit adds a new extension for inter-process communicable SYCL object handles. As part of the initial version of this extension, only inter-process communicable memory is exposed.

@steffenlarsen steffenlarsen force-pushed the ext_oneapi_inter_process_communication branch from cae8ee3 to 14415fe Compare September 10, 2025 08:16
@steffenlarsen steffenlarsen force-pushed the ext_oneapi_inter_process_communication branch from 14415fe to 89f495c Compare September 10, 2025 11:03
@steffenlarsen steffenlarsen force-pushed the ext_oneapi_inter_process_communication branch from 89f495c to 5f443ab Compare September 10, 2025 12:03
@steffenlarsen steffenlarsen force-pushed the ext_oneapi_inter_process_communication branch from 5f443ab to b7d2052 Compare September 10, 2025 12:53
@steffenlarsen steffenlarsen force-pushed the ext_oneapi_inter_process_communication branch from b7d2052 to 07f4355 Compare September 10, 2025 15:57
@steffenlarsen steffenlarsen force-pushed the ext_oneapi_inter_process_communication branch from 07f4355 to 7364b75 Compare September 11, 2025 05:40
This commit adds a new extension for inter-process communicable SYCL
object handles. As part of the initial version of this extension, only
inter-process communicable memory is exposed.

Signed-off-by: Larsen, Steffen <[email protected]>
@@ -439,3 +440,10 @@ struct ur_mem_handle_t_ : ur::cuda::handle_base {
}
}
};

struct ur_exp_ipc_mem_handle_t_ {
umf_memory_pool_handle_t UMFPool;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you need UMFPool to be part of the handle?

Signed-off-by: Larsen, Steffen <[email protected]>
Comment on lines +29 to +38
#if defined(__linux__)
// UMF currently requires ptrace permissions to be set for the spawner. As
// such we need to set it until this limitation has been addressed.
// https://github.com/oneapi-src/unified-memory-framework/tree/main?tab=readme-ov-file#level-zero-memory-provider
if (Q.get_backend() == sycl::backend::ext_oneapi_level_zero &&
prctl(PR_SET_PTRACER, getppid()) == -1) {
std::cout << "Failed to set ptracer permissions!" << std::endl;
return 1;
}
#endif // defined(__linux__)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need to decide if it has to be an application responsibility to set the required permissions.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed. We could move this to the adapter. Seems too low-level as a requirement at user-level.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, but there might be security concerns

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When we designed IPC support in UMF, we agreed that it should be client's responsibility to change the security permissions. However, UMF is a low-level API, and it is acceptable at that level.

Signed-off-by: Larsen, Steffen <[email protected]>
Signed-off-by: Larsen, Steffen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants